#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @author: zzll0909
# @file: 1.py
# @time: 2021/6/21
# @software: PyCharm
import re

if __name__ == "__main__":
    ip_list = list()
    with open("log.log") as fi:
        for each in fi.readlines():
            pos = re.search("((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}",each)
            ip_list.append(each[pos.span()[0]:pos.span()[1]])
    print(set(ip_list))
    pass
